<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Readonly - Facility for creating read-only scalars, arrays, hashes - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Readonly - MetaCPAN" href="https://metacpan.org/dist/Readonly/releases.rss" />
        <link rel="canonical" href="Readonly.html" />
        <meta name="description" content="Facility for creating read-only scalars, arrays, hashes" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Readonly" />
<meta name="twitter:title"       content="Readonly" />
<meta name="twitter:description" content="Facility for creating read-only scalars, arrays, hashes" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="Readonly.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Readonly was released.">
      <span class="relatize">10 Jun 2016 17:05:16 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Readonly">Readonly</a>
  </li>
  <li>
    Module version: 2.05
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Readonly/source/lib/Readonly.pm">Source</a>
    (<a href="https://metacpan.org/dist/Readonly/source/lib/Readonly.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Readonly/source/lib">Browse</a>
    (<a href="https://metacpan.org/dist/Readonly/source/lib?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Readonly/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://github.com/sanko/readonly">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Readonly/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/sanko/readonly">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/sanko/readonly/issues">Issues</a>
      (16)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Readonly+2.05" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=2" style="color: #090">1612</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=4">1</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/SANKO/Readonly-2.05">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Readonly who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Readonly-2.05/index.html">80.37% Coverage </a>
    </li>
    <li>
      License: artistic_2
    </li>
    <li>
      Perl: v5.5.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Readonly/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/S/SA/SANKO/Readonly-2.05.tar.gz">
      Download (<span itemprop="fileSize">28.2KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FSANKO%2FReadonly-2.05%2Flib%2FReadonly.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Readonly/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Readonly/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Readonly">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Readonly">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Readonly.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="SANKO/Readonly-2.05"
>2.05
  (SANKO on 2016-06-10)</option>
<option
  
  value="SANKO/Readonly-2.04"
>2.04
  (SANKO on 2016-05-07)</option>
<option
  
  value="SANKO/Readonly-2.03"
>2.03
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.02"
>2.02
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.01"
>2.01
  (SANKO on 2016-02-24)</option>
<option
  
  value="SANKO/Readonly-2.00"
>2.00
  (SANKO on 2014-07-02)</option>
<option
  
  value="SANKO/Readonly-1.61"
>1.61
  (SANKO on 2014-06-28)</option>
<option
  
  value="ROODE/Readonly-1.03"
>1.03
  (ROODE on 2004-04-21)</option>
<option
  
  value="ROODE/Readonly-1.02"
>1.02
  (ROODE on 2003-05-16)</option>
<option
  
  value="ROODE/Readonly-1.01"
>1.01
  (ROODE on 2003-02-14)</option>
<option
  
  value="ROODE/Readonly-1.00"
>1.00
  (ROODE on 2003-01-08)</option>
<option
  
  value="ROODE/Readonly-0.07"
>0.07
  (ROODE on 2002-06-27)</option>
<option
  
  value="ROODE/Readonly-0.06"
>0.06
  (ROODE on 2002-06-18)</option>
<option
  
  value="ROODE/Readonly-0.05a"
>0.05a
  (ROODE on 2002-03-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="SANKO/Readonly-1.60"
>1.60
  (SANKO on 2014-06-27)</option>
<option
  
  value="SANKO/Readonly-v1.500.0"
>v1.500.0
  (SANKO on 2014-06-25)</option>
<option
  
  value="SANKO/Readonly-1.005_000"
>1.005_000 DEV
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-v1.5.0"
>v1.5.0
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-1.04"
>1.04
  (SANKO on 2013-11-26)</option>
<option
  
  value="SANKO/Readonly-v1.04.0"
>v1.04.0
  (SANKO on 2013-11-26)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/SANKO/Readonly-2.05/diff/' + encodeURIComponent(this.value) + '/lib/Readonly.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="SANKO/Readonly-2.05"
>2.05
  (SANKO on 2016-06-10)</option>
<option
  
  value="SANKO/Readonly-2.04"
>2.04
  (SANKO on 2016-05-07)</option>
<option
  
  value="SANKO/Readonly-2.03"
>2.03
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.02"
>2.02
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.01"
>2.01
  (SANKO on 2016-02-24)</option>
<option
  
  value="SANKO/Readonly-2.00"
>2.00
  (SANKO on 2014-07-02)</option>
<option
  
  value="SANKO/Readonly-1.61"
>1.61
  (SANKO on 2014-06-28)</option>
<option
  
  value="ROODE/Readonly-1.03"
>1.03
  (ROODE on 2004-04-21)</option>
<option
  
  value="ROODE/Readonly-1.02"
>1.02
  (ROODE on 2003-05-16)</option>
<option
  
  value="ROODE/Readonly-1.01"
>1.01
  (ROODE on 2003-02-14)</option>
<option
  
  value="ROODE/Readonly-1.00"
>1.00
  (ROODE on 2003-01-08)</option>
<option
  
  value="ROODE/Readonly-0.07"
>0.07
  (ROODE on 2002-06-27)</option>
<option
  
  value="ROODE/Readonly-0.06"
>0.06
  (ROODE on 2002-06-18)</option>
<option
  
  value="ROODE/Readonly-0.05a"
>0.05a
  (ROODE on 2002-03-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="SANKO/Readonly-1.60"
>1.60
  (SANKO on 2014-06-27)</option>
<option
  
  value="SANKO/Readonly-v1.500.0"
>v1.500.0
  (SANKO on 2014-06-25)</option>
<option
  
  value="SANKO/Readonly-1.005_000"
>1.005_000 DEV
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-v1.5.0"
>v1.5.0
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-1.04"
>1.04
  (SANKO on 2013-11-26)</option>
<option
  
  value="SANKO/Readonly-v1.04.0"
>v1.04.0
  (SANKO on 2013-11-26)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><i>none</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Readonly/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Readonly">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Readonly">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/SANKO/Readonly-2.05/view/lib/Readonly.pm">This version</a>
    </li>
    <li>
      <a href="Readonly.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/BIFFEN"><img src="https://www.gravatar.com/avatar/ceeeed15488c70dd4fd2597cec3d0035?d=identicon&amp;s=20" title="BIFFEN" alt="BIFFEN"></a>
<a class="display-all" href="https://metacpan.org/author/DELON"><img src="https://www.gravatar.com/avatar/8a316157de5eaa39f351b1725c4641d0?d=identicon&amp;s=20" title="DELON" alt="DELON"></a>
<a class="display-all" href="https://metacpan.org/author/XYF"><img src="https://www.gravatar.com/avatar/468b93184448908572ef5dc5c0924e76?d=identicon&amp;s=20" title="XYF" alt="XYF"></a>
<a class="display-all" href="https://metacpan.org/author/PERLBOY"><img src="https://www.gravatar.com/avatar/8553a87a00c8d2efcd77fb16e6eb73c9?d=identicon&amp;s=20" title="PERLBOY" alt="PERLBOY"></a>
<a class="display-all" href="https://metacpan.org/author/RWP"><img src="https://www.gravatar.com/avatar/7110eb2389e69a066d9d7cad7a1cc2bf?d=identicon&amp;s=20" title="RWP" alt="RWP"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Readonly/plussers">7 PAUSE users</a>
</div>
<div>
    14 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 5 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-contrib-email="dsteinbrunner@pobox.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      David Steinbrunner
    </li>
    <li class="contributor"
      data-contrib-email="pm@capmon.dk"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Peter Valdemar Mørch
    </li>
    <li class="contributor"
      data-contrib-email="viacheslav.t@gmail.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      vti
    </li>
    <li class="contributor"
      data-contrib-email="ronaldxs@software-path.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Ronald Schmidt
    </li>
    <li class="contributor"
      data-contrib-email="ivanchenko.michael.work@gmail.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Michael Ivanchenko
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/SANKO" class="author-name">Sanko Robinson</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Readonly.pm&#39;" class="">
<option
  selected
  value="SANKO/Readonly-2.05"
>2.05
  (SANKO on 2016-06-10)</option>
<option
  
  value="SANKO/Readonly-2.04"
>2.04
  (SANKO on 2016-05-07)</option>
<option
  
  value="SANKO/Readonly-2.03"
>2.03
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.02"
>2.02
  (SANKO on 2016-05-06)</option>
<option
  
  value="SANKO/Readonly-2.01"
>2.01
  (SANKO on 2016-02-24)</option>
<option
  
  value="SANKO/Readonly-2.00"
>2.00
  (SANKO on 2014-07-02)</option>
<option
  
  value="SANKO/Readonly-1.61"
>1.61
  (SANKO on 2014-06-28)</option>
<option
  
  value="ROODE/Readonly-1.03"
>1.03
  (ROODE on 2004-04-21)</option>
<option
  
  value="ROODE/Readonly-1.02"
>1.02
  (ROODE on 2003-05-16)</option>
<option
  
  value="ROODE/Readonly-1.01"
>1.01
  (ROODE on 2003-02-14)</option>
<option
  
  value="ROODE/Readonly-1.00"
>1.00
  (ROODE on 2003-01-08)</option>
<option
  
  value="ROODE/Readonly-0.07"
>0.07
  (ROODE on 2002-06-27)</option>
<option
  
  value="ROODE/Readonly-0.06"
>0.06
  (ROODE on 2002-06-18)</option>
<option
  
  value="ROODE/Readonly-0.05a"
>0.05a
  (ROODE on 2002-03-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="SANKO/Readonly-1.60"
>1.60
  (SANKO on 2014-06-27)</option>
<option
  
  value="SANKO/Readonly-v1.500.0"
>v1.500.0
  (SANKO on 2014-06-25)</option>
<option
  
  value="SANKO/Readonly-1.005_000"
>1.005_000 DEV
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-v1.5.0"
>v1.5.0
  (SANKO on 2014-06-24)</option>
<option
  
  value="SANKO/Readonly-1.04"
>1.04
  (SANKO on 2013-11-26)</option>
<option
  
  value="SANKO/Readonly-v1.04.0"
>v1.04.0
  (SANKO on 2013-11-26)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Readonly">Readonly-2.05</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 462 direct dependents &#10;          • 2584 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Readonly-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Readonly-2.05">
    <input type="hidden" name="author" value="SANKO">
    <input type="hidden" name="distribution" value="Readonly">
    <button type="submit" class="favorite highlight"><span>21</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="Readonly.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>21</span> ++</a>
</div>
   / <span>Readonly</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="Readonly.html#NAME">NAME</a></li>
  <li><a href="Readonly.html#Synopsis">Synopsis</a></li>
  <li><a href="Readonly.html#Description">Description</a></li>
  <li><a href="Readonly.html#Variable-Depth">Variable Depth</a></li>
  <li><a href="Readonly.html#"></a></li>
  <li><a href="Readonly.html#The-Past">The Past</a>
    <ul>
      <li><a href="Readonly.html#Comparison-with-%22use-constant%22">Comparison with &quot;use constant&quot;</a></li>
    </ul>
  </li>
  <li><a href="Readonly.html#Comparison-with-typeglob-constants">Comparison with typeglob constants</a>
    <ul>
      <li><a href="Readonly.html#Pros">Pros</a></li>
      <li><a href="Readonly.html#Cons">Cons</a></li>
    </ul>
  </li>
  <li><a href="Readonly.html#Functions">Functions</a></li>
  <li><a href="Readonly.html#Cloning">Cloning</a></li>
  <li><a href="Readonly.html#Examples">Examples</a>
    <ul>
      <li><a href="Readonly.html#Scalars">Scalars</a></li>
      <li><a href="Readonly.html#Arrays/Lists">Arrays/Lists</a></li>
      <li><a href="Readonly.html#Hashes">Hashes</a></li>
    </ul>
  </li>
  <li><a href="Readonly.html#Exports">Exports</a></li>
  <li><a href="Readonly.html#Internals">Internals</a></li>
  <li><a href="Readonly.html#Requirements">Requirements</a></li>
  <li><a href="Readonly.html#Bug-Reports">Bug Reports</a></li>
  <li><a href="Readonly.html#Acknowledgements">Acknowledgements</a></li>
  <li><a href="Readonly.html#Author">Author</a></li>
  <li><a href="Readonly.html#License-and-Legal">License and Legal</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Readonly - Facility for creating read-only scalars, arrays, hashes</p>

<h1 id="Synopsis">Synopsis</h1>

<pre><code>    use Readonly;

    # Deep Read-only scalar
    Readonly::Scalar    $sca =&gt; $initial_value;
    Readonly::Scalar my $sca =&gt; $initial_value;

    # Deep Read-only array
    Readonly::Array    @arr =&gt; @values;
    Readonly::Array my @arr =&gt; @values;

    # Deep Read-only hash
    Readonly::Hash    %has =&gt; (key =&gt; value, key =&gt; value, ...);
    Readonly::Hash my %has =&gt; (key =&gt; value, key =&gt; value, ...);
    # or:
    Readonly::Hash    %has =&gt; {key =&gt; value, key =&gt; value, ...};

    # You can use the read-only variables like any regular variables:
    print $sca;
    $something = $sca + $arr[2];
    next if $has{$some_key};

    # But if you try to modify a value, your program will die:
    $sca = 7;
    push @arr, &#39;seven&#39;;
    delete $has{key};
    # The error message is &quot;Modification of a read-only value attempted&quot;

    # Alternate form (Perl 5.8 and later)
    Readonly    $sca =&gt; $initial_value;
    Readonly my $sca =&gt; $initial_value;
    Readonly    @arr =&gt; @values;
    Readonly my @arr =&gt; @values;
    Readonly    %has =&gt; (key =&gt; value, key =&gt; value, ...);
    Readonly my %has =&gt; (key =&gt; value, key =&gt; value, ...);
    Readonly my $sca; # Implicit undef, readonly value

    # Alternate form (for Perls earlier than v5.8)
    Readonly    \$sca =&gt; $initial_value;
    Readonly \my $sca =&gt; $initial_value;
    Readonly    \@arr =&gt; @values;
    Readonly \my @arr =&gt; @values;
    Readonly    \%has =&gt; (key =&gt; value, key =&gt; value, ...);
    Readonly \my %has =&gt; (key =&gt; value, key =&gt; value, ...);</code></pre>

<h1 id="Description">Description</h1>

<p>This is a facility for creating non-modifiable variables. This is useful for configuration files, headers, etc. It can also be useful as a development and debugging tool for catching updates to variables that should not be changed.</p>

<h1 id="Variable-Depth"><a id="Variable"></a>Variable Depth</h1>

<p>Readonly has the ability to create both deep and shallow readonly variables.</p>

<p>If you pass a <code>$ref</code>, an <code>@array</code> or a <code>%hash</code> to corresponding functions <code>::Scalar()</code>, <code>::Array()</code> and <code>::Hash()</code>, then those functions recurse over the data structure, marking everything as readonly. The entire structure is then non-modifiable. This is normally what you want.</p>

<p>If you want only the top level to be readonly, use the alternate (and poorly named) <code>::Scalar1()</code>, <code>::Array1()</code>, and <code>::Hash1()</code> functions.</p>

<p>Plain <code>Readonly()</code> creates what the original author calls a &quot;shallow&quot; readonly variable, which is great if you don&#39;t plan to use it on anything but only one dimensional scalar values.</p>

<p><code>Readonly::Scalar()</code> makes the variable &#39;deeply&#39; readonly, so the following snippet kills over as you expect:</p>

<pre><code> use Readonly;

 Readonly::Scalar my $ref =&gt; { 1 =&gt; &#39;a&#39; };
 $ref-&gt;{1} = &#39;b&#39;;
 $ref-&gt;{2} = &#39;b&#39;;</code></pre>

<p>While the following snippet does <b>not</b> make your structure &#39;deeply&#39; readonly:</p>

<pre><code> use Readonly;

 Readonly my $ref =&gt; { 1 =&gt; &#39;a&#39; };
 $ref-&gt;{1} = &#39;b&#39;;
 $ref-&gt;{2} = &#39;b&#39;;</code></pre>

<h1 id=""><a id="pod"></a></h1>

<h1 id="The-Past"><a id="The"></a>The Past</h1>

<p>The following sections are updated versions of the previous authors documentation.</p>

<h2 id="Comparison-with-&quot;use-constant&quot;"><a id="Comparison"></a><a id="Comparison-with--use-constant"></a>Comparison with &quot;use constant&quot;</h2>

<p>Perl provides a facility for creating constant values, via the <a href="https://metacpan.org/pod/constant">constant</a> pragma. There are several problems with this pragma.</p>

<ul>

<li><p>The constants created have no leading sigils.</p>

</li>
<li><p>These constants cannot be interpolated into strings.</p>

</li>
<li><p>Syntax can get dicey sometimes. For example:</p>

<pre><code>    use constant CARRAY =&gt; (2, 3, 5, 7, 11, 13);
    $a_prime = CARRAY[2];        # wrong!
    $a_prime = (CARRAY)[2];      # right -- MUST use parentheses</code></pre>

</li>
<li><p>You have to be very careful in places where barewords are allowed.</p>

<p>For example:</p>

<pre><code>    use constant SOME_KEY =&gt; &#39;key&#39;;
    %hash = (key =&gt; &#39;value&#39;, other_key =&gt; &#39;other_value&#39;);
    $some_value = $hash{SOME_KEY};        # wrong!
    $some_value = $hash{+SOME_KEY};       # right</code></pre>

<p>(who thinks to use a unary plus when using a hash to scalarize the key?)</p>

</li>
<li><p><code>use constant</code> works for scalars and arrays, not hashes.</p>

</li>
<li><p>These constants are global to the package in which they&#39;re declared; cannot be lexically scoped.</p>

</li>
<li><p>Works only at compile time.</p>

</li>
<li><p>Can be overridden:</p>

<pre><code>    use constant PI =&gt; 3.14159;
    ...
    use constant PI =&gt; 2.71828;</code></pre>

<p>(this does generate a warning, however, if you have warnings enabled).</p>

</li>
<li><p>It is very difficult to make and use deep structures (complex data structures) with <code>use constant</code>.</p>

</li>
</ul>

<h1 id="Comparison-with-typeglob-constants"><a id="Comparison1"></a>Comparison with typeglob constants</h1>

<p>Another popular way to create read-only scalars is to modify the symbol table entry for the variable by using a typeglob:</p>

<pre><code>    *a = \&#39;value&#39;;</code></pre>

<p>This works fine, but it only works for global variables (&quot;my&quot; variables have no symbol table entry). Also, the following similar constructs do <b>not</b> work:</p>

<pre><code>    *a = [1, 2, 3];      # Does NOT create a read-only array
    *a = { a =&gt; &#39;A&#39;};    # Does NOT create a read-only hash</code></pre>

<h2 id="Pros">Pros</h2>

<p>Readonly.pm, on the other hand, will work with global variables and with lexical (&quot;my&quot;) variables. It will create scalars, arrays, or hashes, all of which look and work like normal, read-write Perl variables. You can use them in scalar context, in list context; you can take references to them, pass them to functions, anything.</p>

<p>Readonly.pm also works well with complex data structures, allowing you to tag the whole structure as nonmodifiable, or just the top level.</p>

<p>Also, Readonly variables may not be reassigned. The following code will die:</p>

<pre><code>    Readonly::Scalar $pi =&gt; 3.14159;
    ...
    Readonly::Scalar $pi =&gt; 2.71828;</code></pre>

<h2 id="Cons">Cons</h2>

<p>Readonly.pm used to impose a performance penalty. It was pretty slow. How slow? Run the <code>eg/benchmark.pl</code> script that comes with Readonly. On my test system, &quot;use constant&quot; (const), typeglob constants (tglob), regular read/write Perl variables (normal/literal), and the new Readonly (ro/ro_simple) are all about the same speed, the old, tie based Readonly.pm constants were about 1/22 the speed.</p>

<p>However, there is relief. There is a companion module available, Readonly::XS. You won&#39;t need this if you&#39;re using Perl 5.8.x or higher.</p>

<p>I repeat, you do not need Readonly::XS if your environment has perl 5.8.x or higher. Please see section entitled <a href="Readonly.html#Internals">Internals</a> for more.</p>

<h1 id="Functions">Functions</h1>

<dl>

<dt id="Readonly::Scalar-$var-=&gt;-$value;"><a id="Readonly"></a><a id="Readonly::Scalar--var----value"></a>Readonly::Scalar $var =&gt; $value;</dt>
<dd>

<p>Creates a nonmodifiable scalar, <code>$var</code>, and assigns a value of <code>$value</code> to it. Thereafter, its value may not be changed. Any attempt to modify the value will cause your program to die.</p>

<p>A value <i>must</i> be supplied. If you want the variable to have <code>undef</code> as its value, you must specify <code>undef</code>.</p>

<p>If <code>$value</code> is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the <code>$value</code> marked as Readonly, use <code>Scalar1</code>.</p>

<p>If $var is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p>

</dd>
<dt id="Readonly::Array-@arr-=&gt;-(value,-value,-...);"><a id="Readonly1"></a><a id="Readonly::Array--arr----value--value"></a>Readonly::Array @arr =&gt; (value, value, ...);</dt>
<dd>

<p>Creates a nonmodifiable array, <code>@arr</code>, and assigns the specified list of values to it. Thereafter, none of its values may be changed; the array may not be lengthened or shortened or spliced. Any attempt to do so will cause your program to die.</p>

<p>If any of the values passed is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the hash <code>%@arr</code> itself marked as Readonly, use <code>Array1</code>.</p>

<p>If <code>@arr</code> is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p>

</dd>
<dt id="Readonly::Hash-%h-=&gt;-(key-=&gt;-value,-key-=&gt;-value,-...);"><a id="Readonly2"></a><a id="Readonly::Hash--h----key---value--key---value"></a>Readonly::Hash %h =&gt; (key =&gt; value, key =&gt; value, ...);</dt>
<dd>

</dd>
<dt id="Readonly::Hash-%h-=&gt;-{key-=&gt;-value,-key-=&gt;-value,-...};"><a id="Readonly3"></a><a id="Readonly::Hash--h----key---value--key---value1"></a>Readonly::Hash %h =&gt; {key =&gt; value, key =&gt; value, ...};</dt>
<dd>

<p>Creates a nonmodifiable hash, <code>%h</code>, and assigns the specified keys and values to it. Thereafter, its keys or values may not be changed. Any attempt to do so will cause your program to die.</p>

<p>A list of keys and values may be specified (with parentheses in the synopsis above), or a hash reference may be specified (curly braces in the synopsis above). If a list is specified, it must have an even number of elements, or the function will die.</p>

<p>If any of the values is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the hash <code>%h</code> itself marked as Readonly, use <code>Hash1</code>.</p>

<p>If <code>%h</code> is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p>

</dd>
<dt id="Readonly-$var-=&gt;-$value;"><a id="Readonly4"></a><a id="Readonly--var----value"></a>Readonly $var =&gt; $value;</dt>
<dd>

</dd>
<dt id="Readonly-@arr-=&gt;-(value,-value,-...);"><a id="Readonly5"></a><a id="Readonly--arr----value--value"></a>Readonly @arr =&gt; (value, value, ...);</dt>
<dd>

</dd>
<dt id="Readonly-%h-=&gt;-(key-=&gt;-value,-...);"><a id="Readonly6"></a><a id="Readonly--h----key---value"></a>Readonly %h =&gt; (key =&gt; value, ...);</dt>
<dd>

</dd>
<dt id="Readonly-%h-=&gt;-{key-=&gt;-value,-...};"><a id="Readonly7"></a><a id="Readonly--h----key---value1"></a>Readonly %h =&gt; {key =&gt; value, ...};</dt>
<dd>

</dd>
<dt id="Readonly-$var;"><a id="Readonly8"></a><a id="Readonly--var"></a>Readonly $var;</dt>
<dd>

<p>The <code>Readonly</code> function is an alternate to the <code>Scalar</code>, <code>Array</code>, and <code>Hash</code> functions. It has the advantage (if you consider it an advantage) of being one function. That may make your program look neater, if you&#39;re initializing a whole bunch of constants at once. You may or may not prefer this uniform style.</p>

<p>It has the disadvantage of having a slightly different syntax for versions of Perl prior to 5.8. For earlier versions, you must supply a backslash, because it requires a reference as the first parameter.</p>

<pre><code>    Readonly \$var =&gt; $value;
    Readonly \@arr =&gt; (value, value, ...);
    Readonly \%h   =&gt; (key =&gt; value, ...);
    Readonly \%h   =&gt; {key =&gt; value, ...};</code></pre>

<p>You may or may not consider this ugly.</p>

<p>Note that you can create implicit undefined variables with this function like so <code>Readonly my $var;</code> while a verbose undefined value must be passed to the standard <code>Scalar</code>, <code>Array</code>, and <code>Hash</code> functions.</p>

</dd>
<dt id="Readonly::Scalar1-$var-=&gt;-$value;"><a id="Readonly9"></a><a id="Readonly::Scalar1--var----value"></a>Readonly::Scalar1 $var =&gt; $value;</dt>
<dd>

</dd>
<dt id="Readonly::Array1-@arr-=&gt;-(value,-value,-...);"><a id="Readonly10"></a><a id="Readonly::Array1--arr----value--value"></a>Readonly::Array1 @arr =&gt; (value, value, ...);</dt>
<dd>

</dd>
<dt id="Readonly::Hash1-%h-=&gt;-(key-=&gt;-value,-key-=&gt;-value,-...);"><a id="Readonly11"></a><a id="Readonly::Hash1--h----key---value--key---value"></a>Readonly::Hash1 %h =&gt; (key =&gt; value, key =&gt; value, ...);</dt>
<dd>

</dd>
<dt id="Readonly::Hash1-%h-=&gt;-{key-=&gt;-value,-key-=&gt;-value,-...};"><a id="Readonly12"></a><a id="Readonly::Hash1--h----key---value--key---value1"></a>Readonly::Hash1 %h =&gt; {key =&gt; value, key =&gt; value, ...};</dt>
<dd>

<p>These alternate functions create shallow Readonly variables, instead of deep ones. For example:</p>

<pre><code>    Readonly::Array1 @shal =&gt; (1, 2, {perl=&gt;&#39;Rules&#39;, java=&gt;&#39;Bites&#39;}, 4, 5);
    Readonly::Array  @deep =&gt; (1, 2, {perl=&gt;&#39;Rules&#39;, java=&gt;&#39;Bites&#39;}, 4, 5);

    $shal[1] = 7;           # error
    $shal[2]{APL}=&#39;Weird&#39;;  # Allowed! since the hash isn&#39;t Readonly
    $deep[1] = 7;           # error
    $deep[2]{APL}=&#39;Weird&#39;;  # error, since the hash is Readonly</code></pre>

</dd>
</dl>

<h1 id="Cloning">Cloning</h1>

<p>When cloning using <a href="https://metacpan.org/pod/Storable">Storable</a> or <a href="Clone.html">Clone</a> you will notice that the value stays readonly, which is correct. If you want to clone the value without copying the readonly flag, use the <code>Clone</code> function:</p>

<pre><code>    Readonly::Scalar my $scalar =&gt; {qw[this that]};
    # $scalar-&gt;{&#39;eh&#39;} = &#39;foo&#39;; # Modification of a read-only value attempted
    my $scalar_clone = Readonly::Clone $scalar;
    $scalar_clone-&gt;{&#39;eh&#39;} = &#39;foo&#39;;
    # $scalar_clone is now {this =&gt; &#39;that&#39;, eh =&gt; &#39;foo&#39;};</code></pre>

<p>The new variable (<code>$scalar_clone</code>) is a mutable clone of the original <code>$scalar</code>.</p>

<h1 id="Examples">Examples</h1>

<p>These are a few very simple examples:</p>

<h2 id="Scalars">Scalars</h2>

<p>A plain old read-only value</p>

<pre><code>    Readonly::Scalar $a =&gt; &quot;A string value&quot;;</code></pre>

<p>The value need not be a compile-time constant:</p>

<pre><code>    Readonly::Scalar $a =&gt; $computed_value;</code></pre>

<h2 id="Arrays/Lists"><a id="Arrays"></a><a id="Arrays-Lists"></a>Arrays/Lists</h2>

<p>A read-only array:</p>

<pre><code>    Readonly::Array @a =&gt; (1, 2, 3, 4);</code></pre>

<p>The parentheses are optional:</p>

<pre><code>    Readonly::Array @a =&gt; 1, 2, 3, 4;</code></pre>

<p>You can use Perl&#39;s built-in array quoting syntax:</p>

<pre><code>    Readonly::Array @a =&gt; qw/1 2 3 4/;</code></pre>

<p>You can initialize a read-only array from a variable one:</p>

<pre><code>    Readonly::Array @a =&gt; @computed_values;</code></pre>

<p>A read-only array can be empty, too:</p>

<pre><code>    Readonly::Array @a =&gt; ();
    Readonly::Array @a;        # equivalent</code></pre>

<h2 id="Hashes">Hashes</h2>

<p>Typical usage:</p>

<pre><code>    Readonly::Hash %a =&gt; (key1 =&gt; &#39;value1&#39;, key2 =&gt; &#39;value2&#39;);</code></pre>

<p>A read-only hash can be initialized from a variable one:</p>

<pre><code>    Readonly::Hash %a =&gt; %computed_values;</code></pre>

<p>A read-only hash can be empty:</p>

<pre><code>    Readonly::Hash %a =&gt; ();
    Readonly::Hash %a;        # equivalent</code></pre>

<p>If you pass an odd number of values, the program will die:</p>

<pre><code>    Readonly::Hash %a =&gt; (key1 =&gt; &#39;value1&#39;, &quot;value2&quot;);
    # This dies with &quot;May not store an odd number of values in a hash&quot;</code></pre>

<h1 id="Exports">Exports</h1>

<p>Historically, this module exports the <code>Readonly</code> symbol into the calling program&#39;s namespace by default. The following symbols are also available for import into your program, if you like: <code>Scalar</code>, <code>Scalar1</code>, <code>Array</code>, <code>Array1</code>, <code>Hash</code>, and <code>Hash1</code>.</p>

<h1 id="Internals">Internals</h1>

<p>Some people simply do not understand the relationship between this module and Readonly::XS so I&#39;m adding this section. Odds are, they still won&#39;t understand but I like to write so...</p>

<p>In the past, Readonly&#39;s &quot;magic&quot; was performed by <code>tie()</code>-ing variables to the <code>Readonly::Scalar</code>, <code>Readonly::Array</code>, and <code>Readonly::Hash</code> packages (not to be confused with the functions of the same names) and acting on <code>WRITE</code>, <code>READ</code>, et. al. While this worked well, it was slow. Very slow. Like 20-30 times slower than accessing variables directly or using one of the other const-related modules that have cropped up since Readonly was released in 2003.</p>

<p>To &#39;fix&#39; this, Readonly::XS was written. If installed, Readonly::XS used the internal methods <code>SvREADONLY</code> and <code>SvREADONLY_on</code> to lock simple scalars. On the surface, everything was peachy but things weren&#39;t the same behind the scenes. In edge cases, code performed very differently if Readonly::XS was installed and because it wasn&#39;t a required dependency in most code, it made downstream bugs very hard to track.</p>

<p>In the years since Readonly::XS was released, the then private internal methods have been exposed and can be used in pure perl. Similar modules were written to take advantage of this and a patch to Readonly was created. We no longer need to build and install another module to make Readonly useful on modern builds of perl.</p>

<ul>

<li><p>You do not need to install Readonly::XS.</p>

</li>
<li><p>You should stop listing Readonly::XS as a dependency or expect it to be installed.</p>

</li>
<li><p>Stop testing the <code>$Readonly::XSokay</code> variable!</p>

</li>
</ul>

<h1 id="Requirements">Requirements</h1>

<p>Please note that most users of Readonly no longer need to install the companion module Readonly::XS which is recommended but not required for perl 5.6.x and under. Please do not force it as a requirement in new code and do not use the package variable <code>$Readonly::XSokay</code> in code/tests. For more, see <a href="https://metacpan.org/pod/the&#32;section&#32;on&#32;Readonly's&#32;new&#32;internals#Internals">&quot;Internals&quot; in the section on Readonly&#39;s new internals</a>.</p>

<p>There are no non-core requirements.</p>

<h1 id="Bug-Reports"><a id="Bug"></a>Bug Reports</h1>

<p>If email is better for you, <a href="Readonly.html#Author">my address is mentioned below</a> but I would rather have bugs sent through the issue tracker found at http://github.com/sanko/readonly/issues.</p>

<h1 id="Acknowledgements">Acknowledgements</h1>

<p>Thanks to Slaven Rezic for the idea of one common function (Readonly) for all three types of variables (13 April 2002).</p>

<p>Thanks to Ernest Lergon for the idea (and initial code) for deeply-Readonly data structures (21 May 2002).</p>

<p>Thanks to Damian Conway for the idea (and code) for making the Readonly function work a lot smoother under perl 5.8+.</p>

<h1 id="Author">Author</h1>

<p>Sanko Robinson &lt;sanko@cpan.org&gt; - http://sankorobinson.com/</p>

<p>CPAN ID: SANKO</p>

<p>Original author: Eric J. Roode, roode@cpan.org</p>

<h1 id="License-and-Legal"><a id="License"></a>License and Legal</h1>

<p>Copyright (C) 2013-2016 by Sanko Robinson &lt;sanko@cpan.org&gt;</p>

<p>Copyright (c) 2001-2004 by Eric J. Roode. All Rights Reserved.</p>

<p>This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Readonly, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Readonly</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Readonly</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="Readonly.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
